import request from '@/utils/request.js'

//微信一键登录
export const loginByWechatApi = (data) => {
	return request.post('/api/xlx-sso/oauth/wechat/loginByWechat', data);
}
//微信登录获取token
export const loginAppByWechatApi = (data) => {
	return request.post('/api/xlx-sso/oauth/wechat/loginAppByWechat', data);
}

//获取手机号并绑定
export const getPhoneApi = (data) => {
	return request.post('/api/xlx-sso/oauth/wechat/getPhone', data);
}

//获取图形验证码
export const getImageCodeApi = (data) => {
	return request.post('/api/xlx-sso/user/getImageCode', data);
}
//校验滑块拼图验证码并发送验证码
export const verifyImageCodeApi = (data) => {
	return request.post('/api/xlx-sso/user/verifyImageCode', data);
}
//手机验证码登录
export const loginVerificationApi = (data) => {
	return request.post('/api/xlx-sso/user/loginVerification', data);
}

//账号密码登录
export const userLoginApi = (data) => {
	return request.post('/api/xlx-sso/user/login', data);
}
//获取用户信息
export const getInfoApi = (data) => {
	return request.post('/api/xlx-sso/user/getInfo', data);
}
//注销
export const logoutApi = () => {
	return request.get('/api/xlx-sso/user/logout');
}